@extends("/paging_template",minWidth=1000,title="产品列表")
@import com.mgfireworks.mgplatform.mgadmin.constants.*
@import com.mgfireworks.mgplatform.mgadmin.product.model.*
@import com.mgfireworks.mgplatform.mgadmin.sys.model.*
@args List<Product> productList, List<Organization> ozs,List<Category> categoryList,List<Band> bandList,List<SellLevel> sellLevelList
	<s_panel v-cloak>
		<s_input name="productId" text="产品编号" value="@val("productId")"></s_input>
		<s_input name="productName" text="产品名" value="@val("productName")"></s_input>
		<s_select name="cateId" text="类别" value="@val("cateId")">
		@if(categoryList){@for(Category c : categoryList){
		<option value="@c.getCateId()">@c.getCateName()</option>
		}}
		</s_select>
		<s_select name="bandId" text="品牌" value="@val("bandId")">
		@if(bandList){@for(Band b : bandList){
		<option value="@b.getBandId()">@b.getBandName()</option>
		}}
		</s_select>
		<s_buttons slot="button" cols="2">
            <s_button type="query-shop" icon="fa-search"></s_button>
            <s_button type="shopping" id="shopping" icon="fa-shopping-cart"></s_button>
		</s_buttons>
	</s_panel>

    <div class="row">
        @if(productList){
        @{int i=0;}
        @for(Product s : productList){
        <div class="product-item col col-sm-12 col-md-12 col-xs-12 col-lg-4">
            <input type="checkbox" name="productId" value="@s.getProductId()"/>
            <div class="thumbnail" style="height: auto;">
                <a href="?">
                    <img src="@url(s.getMainImg())" alt="@s.getProductName()">
                </a>
                <div class="caption">
                    <div class="pi-info">
                        <!--<div class="pi-buttons">-->
                            <!--<a href="@url("edit.html?productId=")@s.getProductId()" class="btn btn-lg btn-primary" role="button"><i class="fa fa-pencil"></i>修改</a>-->
                            <!--<a href="@url("del.json?productId=")@s.getProductId()" class="btn btn-lg btn-default jsDel" role="button"><i class="fa fa-times"></i>删除</a>-->
                        <!--</div>-->
                        <h3>@s.getProductName()</h3>
                        <p>类别：@s.getCategoryName()，品牌：@s.getBandName()</p>
                        <p>销售级别：@s.getSellLevelName()</p>
                        <p>库存：@s.getQuantity()， 价格：@s.getPrice()</p>
                        <div id="collection"><a><i class="fa fa-star-o"></i>&nbsp;收藏</a>
                            <a><i class="fa fa-shopping-cart"></i>&nbsp;加入购物车</a>
                            <div class="collection-m">
                                <a>-</a><input type="text" name="counts" value="1" class="numInput"/><a>+</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        }}
    </div>
    <sidebar_common></sidebar_common>